cmake_minimum_required(VERSION 3.25 FATAL_ERROR)

option(MLN_WITH_CORE_ONLY "Build only the core bits, no platform code" OFF)
option(MLN_WITH_CLANG_TIDY "Build with clang-tidy checks enabled" OFF)
option(MLN_WITH_COVERAGE "Enable code coverage collection" OFF)
option(MLN_WITH_QT "Build MapLibre Native Qt bindings" OFF)
option(MLN_WITH_NODE "Build MapLibre Native Node.js bindings" OFF)
option(MLN_WITH_GLFW "Set up targets for GLFW platform" ON)
option(MLN_WITH_SANITIZER "Use [address|thread|undefined] here" OFF)
option(MLN_WITH_RTTI "Compile with runtime type information" OFF)
option(MLN_WITH_OPENGL "Build with OpenGL renderer" OFF)
option(MLN_WITH_EGL "Build with EGL renderer" OFF)
option(MLN_WITH_VULKAN "Build with Vulkan renderer" OFF)
option(MLN_WITH_METAL "Build with Metal renderer" OFF)
option(MLN_WITH_WEBGPU "Build with WebGPU renderer" OFF)
option(MLN_WITH_PMTILES "Build with PMTiles support" ON)
option(MLN_WITH_WERROR "Make all compilation warnings errors" ON)
option(MLN_USE_UNORDERED_DENSE "Use ankerl dense containers for performance" ON)
option(MLN_USE_TRACY "Enable Tracy instrumentation" OFF)
option(MLN_USE_RUST "Use components in Rust" OFF)
option(MLN_TEXT_SHAPING_HARFBUZZ "Use haffbuzz to shape complex text" ON)
option(MLN_CORE_INCLUDE_DEPS "Include depdendencies in static build of core" OFF)
option(MLN_CREATE_AUTORELEASEPOOL "Create autoreleasepool in render loop" OFF)

include(cmake/validate-backend-options.cmake)
include(cmake/clang-tidy.cmake)

if (MLN_WITH_QT AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
    set(CMAKE_OSX_DEPLOYMENT_TARGET 13.0)
endif()

if(WIN32 AND NOT DEFINED ENV{MSYSTEM} AND NOT MLN_WITH_QT AND NOT CMAKE_SYSTEM_NAME STREQUAL Android)
    set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/platform/windows/custom-toolchain.cmake)
endif()

project("MapLibre Native" LANGUAGES CXX C)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER MapLibre)

set(
    MEMORYCHECK_COMMAND_OPTIONS
    "--leak-check=full --gen-suppressions=all --error-exitcode=1 --suppressions=${PROJECT_SOURCE_DIR}/scripts/valgrind.sup"
)

include(CTest)

if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Release)
endif()

add_library(
    mbgl-compiler-options INTERFACE
)

set(UBSAN_BLACKLIST ${PROJECT_SOURCE_DIR}/scripts/ubsan.blacklist)

if (MLN_WITH_SANITIZER)
    message(STATUS "MLN_WITH_SANITIZER is enabled, using \"${MLN_WITH_SANITIZER}\" sanitizer")
endif()

target_compile_options(
    mbgl-compiler-options
    INTERFACE
        $<$<BOOL:${MLN_WITH_COVERAGE}>:--coverage>
        $<$<BOOL:${MLN_WITH_SANITIZER}>:-DSANITIZE>
        $<$<BOOL:${MLN_WITH_SANITIZER}>:-fno-omit-frame-pointer>
        $<$<BOOL:${MLN_WITH_SANITIZER}>:-fno-optimize-sibling-calls>
        $<$<STREQUAL:${MLN_WITH_SANITIZER},address>:-fsanitize=address>
        $<$<STREQUAL:${MLN_WITH_SANITIZER},thread>:-fsanitize=thread>
        $<$<STREQUAL:${MLN_WITH_SANITIZER},undefined>:-fsanitize=implicit-conversion,
        -fsanitize-blacklist=${UBSAN_BLACKLIST}>
        $<$<STREQUAL:${MLN_WITH_SANITIZER},undefined>:-fsanitize=undefined,
        -fsanitize-blacklist=${UBSAN_BLACKLIST}>
        $<$<STREQUAL:${MLN_WITH_SANITIZER},undefined>:-fsanitize=unsigned-integer-overflow,
        -fsanitize-blacklist=${UBSAN_BLACKLIST}>
        $<$<STREQUAL:${MLN_WITH_SANITIZER},undefined>:-fsanitize=nullability,
        -fsanitize-blacklist=${UBSAN_BLACKLIST}>
        $<$<STREQUAL:${MLN_WITH_SANITIZER},undefined>:-fsanitize=float-divide-by-zero,
        -fsanitize-blacklist=${UBSAN_BLACKLIST}>
        $<$<PLATFORM_ID:iOS>:-fembed-bitcode>
        $<$<AND:$<OR:$<COMPILE_LANGUAGE:CXX>,$<COMPILE_LANGUAGE:OBJCXX>>,$<NOT:$<OR:$<BOOL:${MLN_WITH_RTTI}>,$<CXX_COMPILER_ID:MSVC>>>>:-fno-rtti>
        $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<PLATFORM_ID:Windows>>>:-Wall>
        $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<PLATFORM_ID:Windows>>>:-Wshadow>
        $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<PLATFORM_ID:Windows>>>:-Wextra>
        $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<PLATFORM_ID:Windows>>,$<BOOL:${MLN_WITH_WERROR}>>:-Werror>
        $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<PLATFORM_ID:Android>>:-Wno-error=tautological-constant-compare>
        $<$<CXX_COMPILER_ID:GNU>:-Wno-error=maybe-uninitialized>
        $<$<CXX_COMPILER_ID:GNU>:-Wno-error=return-type>
        $<$<CXX_COMPILER_ID:GNU>:-Wno-error=unknown-pragmas>
        $<$<CXX_COMPILER_ID:GNU>:-Wno-error=pragmas>
        $<$<CXX_COMPILER_ID:GNU>:-Wno-psabi>
        $<$<CXX_COMPILER_ID:AppleClang>:-Wno-unknown-warning-option>
        $<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<NOT:$<BOOL:${MLN_WITH_QT}>>>:-Wno-error=deprecated-declarations>
        $<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<NOT:$<BOOL:${MLN_WITH_QT}>>>:-Wno-error=unused-parameter>
        $<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<NOT:$<BOOL:${MLN_WITH_QT}>>>:-Wno-error=unused-property-ivar>
        $<$<CXX_COMPILER_ID:MSVC>:/utf-8>
        $<$<CXX_COMPILER_ID:MSVC>:/WX>      # all warnings as errors
        $<$<CXX_COMPILER_ID:MSVC>:/EHsc>    # exceptions
        $<$<CXX_COMPILER_ID:MSVC>:/wd4068>  # pragma
        $<$<CXX_COMPILER_ID:MSVC>:/D_USE_MATH_DEFINES>
        $<$<AND:$<NOT:$<CXX_COMPILER_ID:MSVC>>,$<PLATFORM_ID:Windows>>:-D_USE_MATH_DEFINES>
        $<$<CXX_COMPILER_ID:MSVC>:/D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS>
        $<$<CXX_COMPILER_ID:MSVC>:/D_CRT_SECURE_NO_WARNINGS>
)

target_link_libraries(
    mbgl-compiler-options
    INTERFACE
        $<$<BOOL:${MLN_WITH_COVERAGE}>:--coverage>
        $<$<STREQUAL:${MLN_WITH_SANITIZER},address>:-fsanitize=address>
        $<$<STREQUAL:${MLN_WITH_SANITIZER},thread>:-fsanitize=thread>
        $<$<STREQUAL:${MLN_WITH_SANITIZER},undefined>:-fsanitize=undefined>
)

cmake_policy(SET CMP0063 NEW)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_VISIBILITY_PRESET hidden)
if (CMAKE_GENERATOR STREQUAL "Ninja Multi-Config")
    set(CMAKE_CROSS_CONFIGS "all")
    set(CMAKE_DEFAULT_CONFIGS "all")
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_MINSIZEREL ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)

if(MLN_WITH_QT)
    add_library(mbgl-core OBJECT)
else()
    add_library(mbgl-core STATIC)
endif()

list(APPEND INCLUDE_FILES
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/context.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/drawable.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/drawable_data.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/drawable_impl.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/drawable_builder.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/drawable_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/drawable_atlases_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/drawable_custom_layer_host_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/dynamic_texture.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/dynamic_texture_atlas.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/gpu_expression.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/uniform_buffer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/vertex_attribute.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/texture2d.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/renderer/change_request.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/renderer/layer_group.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/renderer/layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/renderer/render_target.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/shader_program_base.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/suppress_copies.hpp
)
list(APPEND SRC_FILES
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/drawable.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/drawable_builder.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/drawable_builder_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/drawable_builder_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/drawable_atlases_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/drawable_custom_layer_host_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/dynamic_texture.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/dynamic_texture_atlas.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/gpu_expression.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/hillshade_prepare_drawable_data.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/image_drawable_data.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/line_drawable_data.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/symbol_drawable_data.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/collision_drawable_data.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/uniform_buffer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/vertex_attribute.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_target.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/change_request.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layer_group.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/tile_layer_group.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/background_layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/background_layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/circle_layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/circle_layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/fill_layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/fill_layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/fill_extrusion_layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/fill_extrusion_layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/heatmap_layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/heatmap_layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/heatmap_texture_layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/heatmap_texture_layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/hillshade_layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/hillshade_layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/hillshade_prepare_layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/hillshade_prepare_layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/line_layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/line_layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/location_indicator_layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/location_indicator_layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/raster_layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/raster_layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/symbol_layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/symbol_layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/collision_layer_tweaker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/collision_layer_tweaker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/shader_program_base.cpp
)

list(APPEND INCLUDE_FILES
    ${PROJECT_SOURCE_DIR}/include/mbgl/actor/actor_ref.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/actor/actor.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/actor/aspiring_actor.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/actor/established_actor.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/actor/mailbox.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/actor/message.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/actor/optional_actor.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/actor/optional_actor_ref.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/actor/scheduler.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/annotation/annotation.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/backend_scope.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/backend.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/color_mode.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/command_encoder.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/debug_group.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/depth_mode.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/draw_mode.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/draw_scope.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/fill_generator.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/gfx_types.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/polyline_generator.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/renderable.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/renderbuffer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/renderer_backend.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/rendering_stats.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/shader_group.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/shader_registry.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/shader.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/stencil_mode.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/types.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/gfx/vertex_buffer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/background_layer_factory.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/circle_layer_factory.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/custom_layer_factory.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/fill_layer_factory.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/heatmap_layer_factory.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/hillshade_layer_factory.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/layer_factory.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/layer_manager.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/line_layer_factory.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/location_indicator_layer_factory.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/raster_layer_factory.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/symbol_layer_factory.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/map/bound_options.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/map/camera.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/map/change.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/map/map_observer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/map/map_options.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/map/map_projection.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/map/map.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/map/mode.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/map/projection_mode.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/math/angles.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/math/clamp.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/math/log2.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/math/minmax.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/math/wrap.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/platform/settings.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/platform/thread.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/renderer/query.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/renderer/renderer_frontend.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/renderer/renderer_observer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/renderer/renderer_state.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/renderer/renderer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/program_parameters.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/shader_source.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/storage/database_file_source.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/storage/file_source_manager.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/storage/file_source.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/storage/network_status.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/storage/offline.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/storage/online_file_source.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/storage/resource_options.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/storage/resource_transform.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/storage/resource.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/storage/response.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/color_ramp_property_value.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion_impl.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/color_ramp_property_value.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/constant.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/coordinate.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/custom_geometry_source_options.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/filter.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/function.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/geojson_options.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/geojson.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/get_json_type.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/layer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/light.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/position.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/property_value.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/rotation.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/source.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/source_options.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/tileset.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/conversion/transition_options.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/assertion.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/at.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/boolean_operator.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/case.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/check_subtype.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/coalesce.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/coercion.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/collator_expression.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/collator.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/comparison.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/compound_expression.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/distance.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/dsl.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/error.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/expression.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/find_zoom_curve.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/format_expression.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/format_section_override.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/formatted.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/get_covering_stops.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/image_expression.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/image.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/in.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/index_of.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/interpolate.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/interpolator.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/is_constant.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/is_expression.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/length.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/let.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/literal.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/match.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/number_format.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/parsing_context.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/slice.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/step.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/type.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/value.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/expression/within.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/filter.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/image.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layer_properties.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layers/background_layer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layers/circle_layer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layers/custom_layer_render_parameters.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layers/custom_layer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layers/fill_extrusion_layer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layers/fill_layer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layers/heatmap_layer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layers/hillshade_layer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layers/line_layer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layers/location_indicator_layer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layers/raster_layer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/layers/symbol_layer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/light.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/position.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/property_expression.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/property_value.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/rotation.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/source.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/sources/custom_geometry_source.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/sources/geojson_source.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/sources/image_source.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/sources/raster_dem_source.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/sources/raster_source.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/sources/tile_source.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/sources/vector_source.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/sprite.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/style_property.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/style.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/transition_options.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/types.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/undefined.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/style/variable_anchor_offset_collection.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/text/glyph_range.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/text/glyph.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/tile/tile_id.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/tile/tile_necessity.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/tile/tile_operation.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/action_journal_options.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/action_journal.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/async_request.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/async_task.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/char_array_buffer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/chrono.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/client_options.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/color.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/compression.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/constants.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/containers.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/convert.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/default_style.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/enum.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/event.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/exception.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/expected.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/feature.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/font_stack.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/geo.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/geojson.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/geometry.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/hash.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/identity.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/ignore.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/image.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/immutable.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/indexed_tuple.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/instrumentation.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/interpolate.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/logging.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/lru_cache.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/noncopyable.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/padding.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/platform.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/premultiply.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/projection.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/range.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/rect.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/run_loop.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/scoped.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/size.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/string_indexer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/string.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/thread.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/tile_server_options.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/tileset.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/timer.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/tiny_unordered_map.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/traits.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/type_list.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/unitbezier.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/util.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/variant.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/vectors.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/work_request.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/work_task_impl.hpp
    ${PROJECT_SOURCE_DIR}/include/mbgl/util/work_task.hpp
)
list(APPEND SRC_FILES
    ${PROJECT_SOURCE_DIR}/src/mbgl/actor/mailbox.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/actor/scheduler.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/algorithm/update_renderables.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/algorithm/update_tile_masks.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/annotation_manager.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/annotation_manager.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/annotation_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/annotation_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/annotation_tile.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/annotation_tile.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/fill_annotation_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/fill_annotation_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/line_annotation_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/line_annotation_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/render_annotation_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/render_annotation_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/shape_annotation_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/shape_annotation_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/symbol_annotation_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/annotation/symbol_annotation_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/geometry/anchor.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/geometry/debug_font_data.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/geometry/dem_data.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/geometry/dem_data.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/geometry/feature_index.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/geometry/feature_index.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/geometry/line_atlas.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/geometry/line_atlas.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/attribute.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/attribute.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/cull_face_mode.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/index_buffer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/index_vector.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/offscreen_texture.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/polyline_generator.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/fill_generator.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/render_pass.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/renderer_backend.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/rendering_stats.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/shader_group.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/shader_registry.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/uniform.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/upload_pass.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/gfx/vertex_vector.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/background_layer_factory.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/circle_layer_factory.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/fill_extrusion_layer_factory.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/fill_layer_factory.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/heatmap_layer_factory.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/hillshade_layer_factory.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/layer_factory.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/layer_manager.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/line_layer_factory.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/raster_layer_factory.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/symbol_layer_factory.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/location_indicator_layer_factory.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_location_indicator_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_location_indicator_layer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/location_indicator_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/location_indicator_layer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/location_indicator_layer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/location_indicator_layer_properties.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/location_indicator_layer_properties.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/circle_layout.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/clip_lines.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/clip_lines.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/layout.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/merge_lines.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/merge_lines.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/pattern_layout.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/symbol_feature.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/symbol_instance.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/symbol_instance.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/symbol_layout.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/symbol_layout.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/symbol_projection.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layout/symbol_projection.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/map/map.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/map/map_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/map/map_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/map/map_options.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/map/map_projection.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/map/transform.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/map/transform.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/map/transform_state.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/map/transform_state.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/map/zoom_history.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/math/log2.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/platform/settings.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/backend_scope.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/bucket.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/bucket_parameters.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/bucket_parameters.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/circle_bucket.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/circle_bucket.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/debug_bucket.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/debug_bucket.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/fill_bucket.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/fill_bucket.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/heatmap_bucket.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/heatmap_bucket.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/hillshade_bucket.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/hillshade_bucket.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/line_bucket.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/line_bucket.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/raster_bucket.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/raster_bucket.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/symbol_bucket.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/buckets/symbol_bucket.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/cross_faded_property_evaluator.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/cross_faded_property_evaluator.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/data_driven_property_evaluator.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/group_by_layout.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/group_by_layout.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/image_manager.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/image_manager.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/image_manager_observer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_background_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_background_layer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_circle_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_circle_layer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_fill_extrusion_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_fill_extrusion_layer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_fill_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_fill_layer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_heatmap_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_heatmap_layer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_hillshade_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_hillshade_layer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_line_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_line_layer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_raster_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_raster_layer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_symbol_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_symbol_layer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/paint_parameters.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/paint_parameters.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/paint_property_binder.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/paint_property_statistics.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/pattern_atlas.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/pattern_atlas.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/possibly_evaluated_property_value.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/property_evaluation_parameters.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/property_evaluator.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_layer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_light.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_light.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_orchestrator.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_orchestrator.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_pass.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_source_observer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_static_data.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_static_data.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_tile.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_tile.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/render_tree.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/renderer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/renderer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/renderer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/renderer_state.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_custom_geometry_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_custom_geometry_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_geojson_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_geojson_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_image_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_image_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_raster_dem_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_raster_dem_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_raster_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_raster_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_tile_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_tile_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_vector_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/sources/render_vector_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/source_state.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/source_state.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/style_diff.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/style_diff.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/tile_mask.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/tile_parameters.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/tile_pyramid.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/tile_pyramid.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/tile_render_data.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/tile_render_data.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/transition_parameters.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/update_parameters.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/upload_parameters.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/shader_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/attributes.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/program_parameters.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/segment.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/uniforms.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/sprite/sprite_loader.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/sprite/sprite_loader.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/sprite/sprite_loader_observer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/sprite/sprite_parser.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/sprite/sprite_parser.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/storage/asset_file_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/storage/mbtiles_file_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/storage/file_source_manager.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/storage/http_file_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/storage/local_file_source.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/storage/main_resource_loader.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/storage/network_status.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/storage/resource.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/storage/resource_options.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/storage/resource_transform.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/storage/response.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/collection.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/color_ramp_property_value.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/constant.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/sprite.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/coordinate.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/custom_geometry_source_options.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/filter.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/function.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/geojson.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/geojson_options.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/get_json_type.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/json.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/light.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/position.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/property_value.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/rotation.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/source_options.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/stringify.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/tileset.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/conversion/transition_options.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/custom_tile_loader.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/custom_tile_loader.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/assertion.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/at.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/boolean_operator.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/case.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/check_subtype.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/coalesce.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/coercion.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/collator.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/collator_expression.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/comparison.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/compound_expression.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/distance.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/dsl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/dsl_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/expression.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/find_zoom_curve.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/format_expression.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/formatted.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/get_covering_stops.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/image.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/image_expression.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/in.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/index_of.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/interpolate.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/is_constant.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/is_expression.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/length.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/let.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/literal.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/match.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/number_format.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/parsing_context.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/slice.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/step.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/util.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/util.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/value.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/within.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/filter.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/image.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sprite.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/image_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/image_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layer_observer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/background_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/background_layer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/background_layer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/background_layer_properties.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/background_layer_properties.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/circle_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/circle_layer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/circle_layer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/circle_layer_properties.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/circle_layer_properties.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/fill_extrusion_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/fill_extrusion_layer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/fill_extrusion_layer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/fill_extrusion_layer_properties.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/fill_extrusion_layer_properties.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/fill_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/fill_layer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/fill_layer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/fill_layer_properties.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/fill_layer_properties.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/heatmap_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/heatmap_layer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/heatmap_layer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/heatmap_layer_properties.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/heatmap_layer_properties.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/hillshade_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/hillshade_layer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/hillshade_layer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/hillshade_layer_properties.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/hillshade_layer_properties.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/line_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/line_layer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/line_layer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/line_layer_properties.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/line_layer_properties.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/raster_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/raster_layer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/raster_layer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/raster_layer_properties.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/raster_layer_properties.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/symbol_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/symbol_layer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/symbol_layer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/symbol_layer_properties.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/symbol_layer_properties.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layout_property.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/light.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/light_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/light_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/light_observer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/observer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/paint_property.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/parser.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/parser.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/properties.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/property_expression.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/rapidjson_conversion.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/source_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/source_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/source_observer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/custom_geometry_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/custom_geometry_source_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/custom_geometry_source_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/geojson_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/geojson_source_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/geojson_source_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/image_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/image_source_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/image_source_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/raster_dem_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/tile_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/raster_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/tile_source_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/tile_source_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/sources/vector_source.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/style.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/style_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/style_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/types.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/variable_anchor_offset_collection.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/custom_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/custom_layer_render_parameters.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/custom_layer_factory.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/custom_layer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/custom_layer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_custom_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_custom_layer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/bidi.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/check_max_angle.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/check_max_angle.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/collision_feature.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/collision_feature.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/collision_index.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/collision_index.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/cross_tile_symbol_index.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/cross_tile_symbol_index.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/get_anchors.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/get_anchors.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/glyph.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/glyph_manager.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/glyph_manager.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/glyph_manager_observer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/glyph_pbf.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/glyph_pbf.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/language_tag.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/language_tag.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/local_glyph_rasterizer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/placement.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/placement.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/quads.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/quads.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/shaping.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/shaping.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/tagged_string.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/text/tagged_string.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/custom_geometry_tile.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/custom_geometry_tile.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/geojson_tile.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/geojson_tile.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/geojson_tile_data.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/geometry_tile.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/geometry_tile.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/geometry_tile_data.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/geometry_tile_data.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/geometry_tile_worker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/geometry_tile_worker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/raster_dem_tile.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/raster_dem_tile.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/raster_dem_tile_worker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/raster_dem_tile_worker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/raster_tile.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/raster_tile.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/raster_tile_worker.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/raster_tile_worker.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/tile.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/tile.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/tile_cache.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/tile_cache.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/tile_id_hash.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/tile_id_io.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/tile_loader.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/tile_loader_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/tile_loader_observer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/tile_observer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/tile_operation.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/vector_tile.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/vector_tile.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/vector_mlt_tile.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/vector_mlt_tile.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/vector_mlt_tile_data.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/vector_mlt_tile_data.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/vector_mvt_tile.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/vector_mvt_tile.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/vector_mvt_tile_data.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/tile/vector_mvt_tile_data.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/action_journal.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/action_journal_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/camera.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/bounding_volumes.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/bounding_volumes.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/chrono.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/client_options.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/color$<IF:$<BOOL:${MLN_USE_RUST}>,.rs.cpp,.cpp>
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/constants.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/convert.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/event.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/filesystem.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/font_stack.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/geo.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/geojson_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/geometry_util.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/geometry_util.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/grid_index.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/grid_index.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/http_header.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/http_header.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/http_timeout.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/http_timeout.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/i18n.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/i18n.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/identity.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/interpolate.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/intersection_tests.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/intersection_tests.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/io.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/io.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/literal.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/logging.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/longest_common_subsequence.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/mapbox.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/mapbox.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/mat2.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/mat2.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/mat3.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/mat3.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/mat4.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/mat4.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/math.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/padding.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/premultiply.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/quaternion.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/rapidjson.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/rapidjson.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/std.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/stopwatch.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/stopwatch.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/string.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/string_indexer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/thread.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/thread_local.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/thread_pool.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/thread_pool.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_coordinate.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_cover.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_cover.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_cover_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_cover_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_range.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/default_style.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_server_options.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/tiny_sdf.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/tiny_sdf.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/token.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/url.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/url.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/utf.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/version.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/version.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/work_request.cpp
)
list(APPEND SRC_FILES
    ${PROJECT_SOURCE_DIR}/src/mbgl/plugin/plugin_layer.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/plugin/plugin_layer_render.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/plugin/plugin_layer_properties.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/plugin/plugin_layer_impl.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/plugin/plugin_layer_factory.hpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/plugin/plugin_layer.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/plugin/plugin_layer_render.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/plugin/plugin_layer_properties.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/plugin/plugin_layer_impl.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/plugin/plugin_layer_factory.cpp
)


if(MLN_WITH_OPENGL)
    message(STATUS "Configuring GL-Native with OpenGL renderer backend")
    target_compile_definitions(
        mbgl-core
        PUBLIC
            MLN_RENDER_BACKEND_OPENGL=1
            "MLN_USE_UNORDERED_DENSE=$<BOOL:${MLN_USE_UNORDERED_DENSE}>"
    )
    list(APPEND
        INCLUDE_FILES
            ${PROJECT_SOURCE_DIR}/include/mbgl/gl/renderable_resource.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/gl/renderer_backend.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/platform/gl_functions.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/shader_manifest.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/shader_group_gl.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/prelude.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/background.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/background_pattern.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/circle.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/clipping_mask.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/collision_box.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/collision_circle.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/custom_geometry.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/custom_symbol_icon.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/debug.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/fill.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/fill_outline.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/fill_pattern.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/fill_outline_pattern.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/fill_outline_triangulated.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/fill_extrusion.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/fill_extrusion_pattern.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/heatmap.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/heatmap_texture.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/hillshade_prepare.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/hillshade.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/line.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/line_gradient.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/line_pattern.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/line_sdf.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/location_indicator.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/location_indicator_textured.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/raster.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/symbol_icon.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/symbol_sdf.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/symbol_text_and_icon.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/wide_vector.hpp
    )
    list(APPEND
        SRC_FILES
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/attribute.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/attribute.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/command_encoder.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/command_encoder.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/context.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/context.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/fence.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/fence.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/debugging_extension.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/debugging_extension.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/defines.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/draw_scope_resource.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/enum.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/enum.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/extension.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/framebuffer.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/index_buffer_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/index_buffer_resource.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/object.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/object.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/offscreen_texture.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/offscreen_texture.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/render_pass.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/render_pass.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/renderbuffer_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/renderbuffer_resource.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/renderer_backend.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/resource_pool.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/resource_pool.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/state.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/timestamp_query_extension.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/timestamp_query_extension.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/types.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/uniform.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/uniform.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/upload_pass.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/upload_pass.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/value.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/value.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/vertex_array.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/vertex_array.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/vertex_buffer_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/gl/vertex_buffer_resource.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/platform/gl_functions.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/gl/legacy/clipping_mask_program.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/gl/legacy/program_base.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/gl/legacy/program.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/gl/legacy/programs.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/gl/legacy/programs.hpp
    )

    list(APPEND INCLUDE_FILES
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/background_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/circle_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/collision_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/custom_drawable_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/debug_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/fill_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/fill_extrusion_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/heatmap_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/heatmap_texture_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/hillshade_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/hillshade_prepare_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/line_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/location_indicator_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/raster_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/shader_defines.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/symbol_layer_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/widevector_ubo.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/style/layers/custom_drawable_layer.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/layermanager/custom_drawable_layer_factory.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/gl/shader_program_gl.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/gl/buffer_allocator.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/gl/drawable_gl.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/gl/drawable_gl_builder.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/gl/layer_group_gl.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/gl/uniform_buffer_gl.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/gl/vertex_attribute_gl.hpp
        ${PROJECT_SOURCE_DIR}/include/mbgl/gl/texture2d.hpp
    )
    list(APPEND SRC_FILES
        ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/gl/shader_info.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/gl/shader_program_gl.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/gl/buffer_allocator.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/gl/drawable_gl.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/gl/drawable_gl_builder.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/gl/drawable_gl_impl.hpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/gl/layer_group_gl.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/gl/texture2d.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/gl/uniform_buffer_gl.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/gl/vertex_attribute_gl.cpp
    )
endif()

if(MLN_WITH_METAL)
    message(STATUS "Configuring Metal renderer backend")
    target_compile_definitions(
        mbgl-core
        PUBLIC
            MLN_RENDER_BACKEND_METAL=1
            "MLN_USE_UNORDERED_DENSE=$<BOOL:${MLN_USE_UNORDERED_DENSE}>"
    )
    list(APPEND
        INCLUDE_FILES
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/buffer_resource.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/command_encoder.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/context.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/drawable.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/drawable_builder.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/index_buffer_resource.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/layer_group.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/mtl_fwd.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/offscreen_texture.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/render_pass.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/renderer_backend.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/renderable_resource.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/texture2d.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/tile_layer_group.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/uniform_buffer.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/upload_pass.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/vertex_attribute.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/mtl/vertex_buffer_resource.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/background.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/circle.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/clipping_mask.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/common.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/collision.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/custom_geometry.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/custom_symbol_icon.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/debug.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/fill.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/fill_extrusion.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/heatmap.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/heatmap_texture.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/hillshade.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/hillshade_prepare.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/line.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/location_indicator.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/raster.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/shader_group.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/shader_program.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/mtl/symbol.hpp
            )
    list(APPEND
        SRC_FILES
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/buffer_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/command_encoder.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/context.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/drawable.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/drawable_impl.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/drawable_builder.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/index_buffer_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/layer_group.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/mtl.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/offscreen_texture.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/renderer_backend.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/texture2d.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/render_pass.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/tile_layer_group.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/uniform_buffer.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/upload_pass.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/vertex_attribute.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/mtl/vertex_buffer_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/shader_program.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/background.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/circle.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/collision.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/clipping_mask.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/custom_geometry.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/custom_symbol_icon.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/debug.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/fill.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/fill_extrusion.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/heatmap.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/heatmap_texture.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/hillshade.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/hillshade_prepare.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/line.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/location_indicator.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/raster.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/symbol.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/mtl/widevector.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/mtl/custom_layer_render_parameters.cpp
    )

    find_library(METAL_FRAMEWORK Metal)
    if (METAL_FRAMEWORK)
        target_link_libraries(mbgl-core PRIVATE ${METAL_FRAMEWORK})
    endif()

endif()

if(MLN_WITH_VULKAN)
    message(STATUS "Configuring Vulkan renderer backend")

    target_compile_definitions(
        mbgl-core
        PUBLIC
            MLN_RENDER_BACKEND_VULKAN=1
    )

    list(APPEND
        INCLUDE_FILES
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/buffer_resource.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/command_encoder.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/context.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/drawable.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/descriptor_set.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/drawable_builder.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/index_buffer_resource.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/layer_group.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/offscreen_texture.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/pipeline.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/renderer_backend.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/render_pass.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/renderable_resource.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/texture2d.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/tile_layer_group.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/uniform_buffer.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/upload_pass.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/vertex_attribute.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/vulkan/vertex_buffer_resource.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/shader_group.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/shader_program.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/background.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/circle.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/clipping_mask.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/collision.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/common.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/custom_geometry.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/custom_symbol_icon.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/fill.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/fill_extrusion.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/heatmap.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/heatmap_texture.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/hillshade.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/hillshade_prepare.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/line.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/location_indicator.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/raster.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/symbol.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/vulkan/widevector.hpp
    )

    list(APPEND
        SRC_FILES
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/buffer_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/command_encoder.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/context.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/descriptor_set.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/drawable.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/drawable_builder.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/drawable_impl.hpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/index_buffer_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/layer_group.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/offscreen_texture.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/pipeline.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/renderer_backend.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/render_pass.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/renderable_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/texture2d.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/tile_layer_group.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/uniform_buffer.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/upload_pass.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/vertex_attribute.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/vulkan/vertex_buffer_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/shader_program.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/background.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/circle.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/clipping_mask.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/collision.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/custom_geometry.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/custom_symbol_icon.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/debug.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/fill.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/fill_extrusion.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/heatmap.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/heatmap_texture.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/hillshade.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/hillshade_prepare.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/line.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/location_indicator.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/raster.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/symbol.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/vulkan/widevector.cpp
    )
endif()

if(MLN_WITH_WEBGPU)
    message(STATUS "Configuring WebGPU renderer backend")

    target_compile_definitions(
        mbgl-core
        PUBLIC
            MLN_RENDER_BACKEND_WEBGPU=1
    )

    list(APPEND
        SRC_FILES
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/buffer_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/context.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/command_encoder.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/headless_backend.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/renderer_backend.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/drawable.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/drawable_builder.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/draw_scope_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/uniform_buffer.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/shader_program.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/wgsl_preprocessor.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/background.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/circle.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/clipping_mask.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/collision.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/custom_geometry.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/custom_symbol_icon.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/debug.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/fill.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/fill_extrusion.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/heatmap.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/heatmap_texture.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/hillshade.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/hillshade_prepare.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/line.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/location_indicator.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/raster.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/symbol.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/widevector.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/vertex_buffer_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/vertex_attribute.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/texture2d.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/offscreen_texture.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/tile_layer_group.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/layer_group.cpp
    )

    list(APPEND
        INCLUDE_FILES
            ${PROJECT_SOURCE_DIR}/include/mbgl/webgpu/buffer_resource.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/webgpu/command_encoder.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/webgpu/context.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/webgpu/drawable.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/webgpu/drawable_builder.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/webgpu/index_buffer_resource.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/webgpu/render_pass.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/webgpu/renderer_backend.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/shader_program.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/background.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/circle.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/clipping_mask.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/collision.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/common.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/custom_geometry.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/custom_symbol_icon.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/debug.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/fill.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/fill_extrusion.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/heatmap.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/heatmap_texture.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/hillshade.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/hillshade_prepare.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/line.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/location_indicator.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/raster.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/symbol.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/shaders/webgpu/widevector.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/webgpu/texture2d.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/webgpu/uniform_buffer.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/webgpu/upload_pass.hpp
            ${PROJECT_SOURCE_DIR}/include/mbgl/webgpu/vertex_buffer_resource.hpp
    )

    list(APPEND
        SRC_FILES
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/buffer_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/command_encoder.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/context.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/drawable.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/drawable_builder.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/index_buffer_resource.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/render_pass.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/renderer_backend.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/shaders/webgpu/shader_program.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/texture2d.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/uniform_buffer.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/upload_pass.cpp
            ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/vertex_buffer_resource.cpp
    )

    # Include WebGPU vendor configuration (Dawn or wgpu)
    include(${PROJECT_SOURCE_DIR}/vendor/webgpu.cmake)

    # Include Dawn integration when requested
    if(MLN_WEBGPU_IMPL_DAWN)
        include(${PROJECT_SOURCE_DIR}/vendor/dawn.cmake)
        if(TARGET mbgl-vendor-dawn)
            target_link_libraries(mbgl-core PRIVATE mbgl-vendor-dawn)
        endif()
    elseif(MLN_WEBGPU_IMPL_WGPU)
        # Include wgpu-native integration
        include(${PROJECT_SOURCE_DIR}/vendor/wgpu.cmake)
        if(TARGET mbgl-vendor-wgpu)
            target_link_libraries(mbgl-core PRIVATE mbgl-vendor-wgpu)
            # Add WebGPU-Cpp implementation file (required for wgpu-native backend)
            list(APPEND SRC_FILES ${PROJECT_SOURCE_DIR}/src/mbgl/webgpu/webgpu_cpp_impl.cpp)
        endif()
    endif()
endif()

list(APPEND
    SRC_FILES
        ${PROJECT_SOURCE_DIR}/src/mbgl/layermanager/custom_drawable_layer_factory.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_custom_drawable_layer.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/renderer/layers/render_custom_drawable_layer.hpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/custom_drawable_layer_impl.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/custom_drawable_layer_impl.hpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/style/layers/custom_drawable_layer.cpp
)

# Harfbuzz text shaping
set(SHAPE_TARGETS, "")
list(APPEND
    SRC_FILES
        # Base text shaping files, which are always included. They don't depend on HarfBuzz if MLN_TEXT_SHAPING_HARFBUZZ is OFF.
        ${PROJECT_SOURCE_DIR}/src/mbgl/text/harfbuzz.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/text/harfbuzz.hpp
)
if (MLN_TEXT_SHAPING_HARFBUZZ)
    message(STATUS "Configuring with HarfBuzz text shaping")
    list(APPEND
        SRC_FILES
        ${PROJECT_SOURCE_DIR}/src/mbgl/text/harfbuzz_impl.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/text/harfbuzz_impl.hpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/text/freetype.cpp
        ${PROJECT_SOURCE_DIR}/src/mbgl/text/freetype.hpp
    )
    target_compile_definitions(
        mbgl-core
        PRIVATE MLN_TEXT_SHAPING_HARFBUZZ=1
    )
    include(${PROJECT_SOURCE_DIR}/vendor/freetype.cmake)
    include(${PROJECT_SOURCE_DIR}/vendor/harfbuzz.cmake)

    target_include_directories(
        mbgl-core SYSTEM
        PUBLIC
            ${PROJECT_SOURCE_DIR}/vendor/freetype/include
            ${PROJECT_SOURCE_DIR}/vendor/harfbuzz/src
    )

endif()

target_sources(
    mbgl-core PRIVATE
    ${INCLUDE_FILES}
    ${SRC_FILES}
)

if (MLN_WITH_CLANG_TIDY)
    set_target_properties(mbgl-core PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}")
endif()

set_source_files_properties(
    ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/utf.cpp
    PROPERTIES
    COMPILE_FLAGS
    $<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>:-Wno-deprecated-declarations>
)

# gcc 12 compiler bug, remove when fixed
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651
set_source_files_properties(
    ${PROJECT_SOURCE_DIR}/src/mbgl/style/expression/compound_expression.cpp
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/font_stack.cpp
    PROPERTIES
    COMPILE_FLAGS
    $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,12.0.0>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,13.0.0>>:-Wno-restrict>
)

source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${INCLUDE_FILES})
source_group(TREE ${PROJECT_SOURCE_DIR}/src FILES ${SRC_FILES})

if(EXISTS ${PROJECT_SOURCE_DIR}/.git/HEAD)
    execute_process(
        COMMAND
            git
            rev-parse
            --short=8
            HEAD
        WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
        OUTPUT_VARIABLE MLN_VERSION_REV
        OUTPUT_STRIP_TRAILING_WHITESPACE
    )
else()
    set(MLN_VERSION_REV 00000000)
endif()

set_source_files_properties(
    ${PROJECT_SOURCE_DIR}/src/mbgl/util/version.cpp
    PROPERTIES
    COMPILE_DEFINITIONS
    MBGL_VERSION_REV="${MLN_VERSION_REV}"
)

target_include_directories(
    mbgl-core
    PRIVATE ${PROJECT_SOURCE_DIR}/src
)

target_include_directories(
    mbgl-core
    PUBLIC ${PROJECT_SOURCE_DIR}/include
)

include(${PROJECT_SOURCE_DIR}/vendor/args.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/boost.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/csscolorparser.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/earcut.hpp.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/eternal.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/rapidjson.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/maplibre-native-base.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/parsedate.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/pmtiles.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/polylabel.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/protozero.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/tracy.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/unique_resource.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/unordered_dense.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/vector-tile.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/wagyu.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/metal-cpp.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/maplibre-tile-spec.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/supercluster.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/expected-lite.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/kdbush.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/filesystem.cmake)

if(MLN_USE_RUST)
include(${PROJECT_SOURCE_DIR}/rustutils/rustutils.cmake)
endif()

target_link_libraries(
    mbgl-core
    PRIVATE
        mbgl-vendor-kdbush
        MapLibreNative::Base::shelf-pack-cpp
        MapLibreNative::Base::geojson-vt-cpp
        MapLibreNative::Base::cheap-ruler-cpp
        mbgl-compiler-options
        mbgl-vendor-boost
        mbgl-vendor-earcut.hpp
        mbgl-vendor-eternal
        mbgl-vendor-parsedate
        mbgl-vendor-pmtiles
        mbgl-vendor-polylabel
        mbgl-vendor-protozero
        mbgl-vendor-supercluster
        mbgl-vendor-unique_resource
        mbgl-vendor-vector-tile
        mbgl-vendor-wagyu
	    mlt-cpp
        $<$<BOOL:${MLN_WITH_METAL}>:mbgl-vendor-metal-cpp>
        $<IF:$<BOOL:${MLN_USE_RUST}>,mbgl-rustutils,mbgl-vendor-csscolorparser>
        $<$<BOOL:${MLN_TEXT_SHAPING_HARFBUZZ}>:mbgl-freetype>
        $<$<BOOL:${MLN_TEXT_SHAPING_HARFBUZZ}>:mbgl-harfbuzz>
    PUBLIC
        MapLibreNative::Base
        mbgl-vendor-expected-lite
        mbgl-vendor-rapidjson
        MapLibreNative::Base::geojson.hpp
        MapLibreNative::Base::geometry.hpp
        MapLibreNative::Base::variant
        $<$<BOOL:${MLN_USE_TRACY}>:TracyClient>
        unordered_dense
)

set(EXPORT_TARGETS
    mbgl-core
    maplibre-native-base
    maplibre-native-base-cheap-ruler-cpp
    mbgl-vendor-expected-lite
    mbgl-vendor-kdbush
    maplibre-native-base-geojson-vt-cpp
    maplibre-native-base-geojson.hpp
    maplibre-native-base-geometry.hpp
    maplibre-native-base-jni.hpp
    maplibre-native-base-pixelmatch-cpp
    maplibre-native-base-shelf-pack-cpp
    mbgl-vendor-supercluster
    maplibre-native-base-variant
    mbgl-compiler-options
    mbgl-vendor-boost
    mbgl-vendor-earcut.hpp
    mbgl-vendor-eternal
    mbgl-vendor-filesystem
    mbgl-vendor-metal-cpp
    mbgl-vendor-rapidjson
    mbgl-vendor-parsedate
    mbgl-vendor-pmtiles
    mbgl-vendor-polylabel
    mbgl-vendor-protozero
    mbgl-vendor-unique_resource
    mbgl-vendor-vector-tile
    mbgl-vendor-wagyu
    mlt-cpp
    unordered_dense
)

if(MLN_USE_RUST)
    list(APPEND EXPORT_TARGETS mbgl-rustutils rustutils)
else()
    list(APPEND EXPORT_TARGETS mbgl-vendor-csscolorparser)
endif()

if(MLN_TEXT_SHAPING_HARFBUZZ)
    list(APPEND EXPORT_TARGETS mbgl-freetype mbgl-harfbuzz)
endif()

if(TARGET mbgl-vendor-dawn)
    list(APPEND EXPORT_TARGETS mbgl-vendor-dawn)
endif()

if(TARGET mbgl-vendor-wgpu)
    list(APPEND EXPORT_TARGETS mbgl-vendor-wgpu)
endif()

export(TARGETS ${EXPORT_TARGETS} FILE MapboxCoreTargets.cmake)

if(MLN_WITH_VULKAN)
    include(${PROJECT_SOURCE_DIR}/vendor/vulkan.cmake)

    target_link_libraries(
        mbgl-core
        PUBLIC
            mbgl-vendor-vulkan-headers
            mbgl-vendor-VulkanMemoryAllocator
            glslang
            SPIRV
            glslang-default-resource-limits
    )
endif()

set_target_properties(
    mbgl-core
    PROPERTIES
        INTERFACE_MAPLIBRE_NAME "MapLibre Native"
        INTERFACE_MAPLIBRE_URL "https://github.com/maplibre/maplibre-native"
        INTERFACE_MAPLIBRE_AUTHOR "MapLibre"
        INTERFACE_MAPLIBRE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE.md
)

if(MLN_WITH_METAL AND MLN_CREATE_AUTORELEASEPOOL)
    # When using the Metal backend, if there is is no AutoreleasePool, it will result
    # in memory leaks when autoreleased objects are created.

    # Platforms such as iOS and GLFW use ARC with @autoreleasepool blocks, for these platforms
    # creating an AutoreleasePool is not neccesary (and in fact will not work).
    # When using MapLibre Native with Metal on other platforms such as Node.js, you can pass
    # this variable to ensure an AutoReleasePool is created in the render loop.
    # See also:
    # https://developer.apple.com/documentation/foundation/nsautoreleasepool
    # https://github.com/maplibre/maplibre-native/issues/2928
    # vendor/metal-cpp/README.md 'AutoreleasePools and Objects'
    target_compile_definitions(
        mbgl-core
            PRIVATE MLN_CREATE_AUTORELEASEPOOL=1
    )
endif()

set_property(TARGET mbgl-core PROPERTY FOLDER MapLibre)

add_library(
    Mapbox::Map ALIAS mbgl-core
)

if(MLN_WITH_CORE_ONLY)
    return()
endif()

include(${PROJECT_SOURCE_DIR}/scripts/license.cmake)

if(MLN_WITH_QT)
    include(${PROJECT_SOURCE_DIR}/platform/qt/qt.cmake)
elseif(CMAKE_SYSTEM_NAME STREQUAL Android)
    include(${PROJECT_SOURCE_DIR}/platform/android/android.cmake)
elseif(CMAKE_SYSTEM_NAME STREQUAL Linux)
    include(${PROJECT_SOURCE_DIR}/platform/linux/linux.cmake)
elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
    include(${PROJECT_SOURCE_DIR}/platform/darwin/darwin.cmake)
    include(${PROJECT_SOURCE_DIR}/platform/macos/macos.cmake)
elseif(CMAKE_SYSTEM_NAME STREQUAL iOS)
    include(${PROJECT_SOURCE_DIR}/platform/darwin/darwin.cmake)
    include(${PROJECT_SOURCE_DIR}/platform/ios/ios.cmake)
elseif(WIN32)
    include(${PROJECT_SOURCE_DIR}/platform/windows/windows.cmake)
else()
    message(FATAL_ERROR "Unsupported target platform: " ${CMAKE_SYSTEM_NAME})
endif()

add_subdirectory(${PROJECT_SOURCE_DIR}/test)
add_subdirectory(${PROJECT_SOURCE_DIR}/benchmark)
add_subdirectory(${PROJECT_SOURCE_DIR}/render-test)

include(cmake/mbgl-core-deps.cmake)
